
import java.util.Arrays;
public class Text {
    public static void printArray(int[] array) {
        for (int i = 0; i < array.length; i++) {
            System.out.print(array[i]+" ");
        }
    }

    public static void main(String[] args) {
        int[] array={1,2,3,4,5};
        printArray(array);
    }
    public static void main7(String[] args) {
        int[] array=new int[100];
        for (int i = 0; i < 100; i++) {
            array[i]=i+1;
        }
        System.out.println(Arrays.toString(array));
    }
    public static void move(char pos1,char pos2) {
        System.out.print(pos1+"->"+pos2+" ");
    }
    public static void hanio(int n,char pos1,char pos2,char pos3) {
        if(n==1){
            move(pos1,pos3);
            return;
        }
        hanio(n-1,pos1,pos3,pos2);
        move(pos1,pos3);
        hanio(n-1,pos2,pos1,pos3);
    }

    public static void main6(String[] args) {
        hanio(3,'A','B','C');
    }
    public static int fib(int n) {
        if(n==1 || n==2){
            return 1;
        }
        return fib(n-1)+fib(n-2);
    }
    public static void main5(String[] args) {
        System.out.println(fib(7
        ));
    }
    public static int func4(int n) {
        if(n<10){
            return n;
        }
        return n%10+func4(n/10);
    }
    public static void main4(String[] args) {
        System.out.println(func4(1234));
    }
    public static void func3(int n) {
        if(n<10){
            System.out.print(n+" ");
            return;
        }
        func3(n/10);
        System.out.print(n%10+" ");
    }
    public static void main3(String[] args) {
        func3(1234);
    }
    public static int func2(int n) {
        if(n==1){
            return 1;
        }
        return n+func2(n-1);
    }
    public static void main2(String[] args) {
        System.out.println(func2(10));
    }
    public static int func1(int n) {
        if(n==1){
            return 1;
        }
        return n*func1(n-1);
    }
    public static void main1(String[] args) {
        System.out.println(func1(5));
    }
}
